package
{
	import Array;

	import flash.display.Sprite;

	import flexunit.flexui.FlexUnitTestRunnerUIAS;

	import me.feng.component.ComponentTester;
	import me.feng.component.UniqueClassComponentTester;
	import me.feng.component.UniqueNameComponentTester;
	import me.feng.core.NamedAssetTester;


	/**
	 *
	 * @author feng 2015-12-7
	 */
	public class FlexUnitApplication extends Sprite
	{
		public function FlexUnitApplication()
		{
			onCreationComplete();
		}

		private function onCreationComplete():void
		{
			var testRunner:FlexUnitTestRunnerUIAS = new FlexUnitTestRunnerUIAS();
			testRunner.portNumber = 8765;
			this.addChild(testRunner);
			testRunner.runWithFlexUnit4Runner(currentRunTestSuite(), "fengCommonTestUnit");
		}

		public function currentRunTestSuite():Array
		{
			var testsToRun:Array = new Array();
			testsToRun.push(me.feng.component.ComponentTester);
			testsToRun.push(me.feng.component.UniqueClassComponentTester);
			testsToRun.push(me.feng.component.UniqueNameComponentTester);
			testsToRun.push(me.feng.core.NamedAssetTester);
			return testsToRun;
		}
	}
}
